<div class='fui-page fui-page-current member-log-page'>
    <div class='fui-content' >
        <div class='content-empty' ng-show="!pagedata.list || pagedata.list.length<=0">
            <i class='fa fa-comment-o'></i><br/>暂时没有任何员工!
        </div>
        <div class='fui-list-group container' ng-show="pagedata.list.length>0" >
			<div class="fui-list goods-item" ng-repeat="item in pagedata.list">
				<div class="fui-list-inner">
					<div class='title'>
						<span class="label label-success">{{item.member.nickname}} (ID{{item.mid}})</span>
					</div>
					<div class='title' style="font-size:0.6rem;">
						累计下单：<span class="red" style="margin-left:0.3rem">{{item.totalprice}}</span>
						<span class="gray" style="font-size:0.6rem;"> 元</span>
					</div>
					<div class='red' style="font-size:0.6rem;"> 需审批额度：￥{{item.cfee}}</div>
					<div class='gray' style="font-size:0.6rem;">成为员工：{{item.createtime}}</div>
				</div>
				<div class='fui-list-angle'>
					<div class="btn btn-sm btn-warning-o order-finish" ng-click="pagedata.nowitem=item;pagedata.showedit=true">编辑</div>
					<div class="btn btn-sm btn-danger-o order-finish" ng-click="post({'id':item.id},'/worker/del/id='+item.id)">删除</div>
				</div>
			</div>
		</div>
    </div>
</div>
<div class="fe-floatright-bottom" style="bottom:3rem">
	<div class="icon" style="border-radius: 100%;background-color: {{main.syscolor || '#63BE72'}};width:2rem;height:2rem;color:#fff;line-height:2rem;font-size:0.6rem" href="javascript:;" ng-click="pagedata.showadd=true">
		添加
	</div>
</div>
<div ng-if="pagedata.showadd" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.showadd=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 2rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在添加员工的操作
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'>员工ID</div>
					<div class='fui-cell-info'><input type='text' class='fui-input' placeholder="员工ID" ng-model="pagedata.post.mid"></div>
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'>需审批额度</div>
					<div class='fui-cell-info'><input type='text' class='fui-input' placeholder="需审批额度" ng-model="pagedata.post.cfee"></div>
				</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fff;color:#fc6d60" ng-click="post(pagedata.post,'/worker/post/')">确认添加</a>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.showedit" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.showedit=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 1rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在编辑员工({{pagedata.nowitem.member.nickname}})的操作
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'>需审批额度</div>
					<div class='fui-cell-info'><input type='text' class='fui-input' placeholder="需审批额度" ng-model="pagedata.nowitem.cfee"></div>
				</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fff;color:#fc6d60" ng-click="post(pagedata.nowitem,'/worker/post/')">确认提交</a>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.tool.get_list('jy_yuejie/worker/list/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_yuejie/worker/list/');
}
</script>